package com.woniuxy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/*
@Controller注册到Spring容器中，并非昨日的bean标签 id =”/first“
仅仅只是在Spring中注册一个bean，名字叫做rbacManagerController,我们可以通过getBean获取到
 */
@Controller
//今日份请求url怎么配置呢？ 一级路由地址  localhost:8080/findOne
@RequestMapping("role")
public class RbacRoleController {
    @RequestMapping("/findOne")
    public ModelAndView findOnefine(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("msg","我的findOne方法进入了");
        modelAndView.setViewName("/index.jsp");
        return modelAndView;
    }
    @RequestMapping("/findTwo")
    public ModelAndView findTwo(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("msg","我的findTwo方法进入了");
        modelAndView.setViewName("/index.jsp");
        return modelAndView;
    }
    @RequestMapping("/first")
    public ModelAndView first() {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("msg","我的first方法进入了");
        modelAndView.setViewName("/index.jsp");
        return modelAndView;
    }
}
